/*
* 菜单api
*
*/

import { postRequest, getRequest } from '@/lib/axios';

export const menusApi = {
    /*
    * 创建菜单
    *
    */
    create: (params) => {
        return postRequest('/api/private/menus/create', params);
    },

    /**
     *  获取所有菜单
     * 
    */
    list: (params) => {
        return postRequest('/api/private/menus/list', params);
    },

    /**
     *  根据id查询菜单信息
     * 
    */
    findOne: (params) => {
        return postRequest('/api/private/menus/findOne', params);
    },

    /**
     *  更新菜单信息
     * 
    */
    update: (params) => {
        return postRequest('/api/private/menus/update', params);
    },

    /**
     *  删除菜单信息
     * 
    */
    delete: (params) => {
        return postRequest('/api/private/menus/delete', params);
    },

    /**
     *  删除所有菜单信息
     * 
    */
    deleteAll: () => {
        return postRequest('/api/private/menus/deleteAll');
    },
}